﻿Option Explicit On
Option Strict On

Imports System

Public Interface IConfig

    Property Name As String
    ReadOnly Property ConfigSource As IConfigSource
    ReadOnly Property Aliases As AliasText

    Function Contains(ByVal key As String) As Boolean
    Function GetValue(ByVal key As String) As String
    Function GetValue(ByVal key As String, ByVal defaultValue As String) As String

    Function GetExpanded(ByVal key As String) As String
    Function GetString(ByVal key As String) As String
    Function GetString(ByVal key As String, ByVal defaultValue As String) As String
    Function GetInt32(ByVal key As String) As Integer
    Function GetInt32(ByVal key As String, ByVal fromAlias As Boolean) As Integer
    Function GetInt32(ByVal key As String, ByVal defaultValue As Integer) As Integer
    Function GetInt32(ByVal key As String, ByVal defaultValue As Integer, ByVal fromAlias As Boolean) As Integer

    Function GetInt64(ByVal key As String) As Long
    Function GetInt64(ByVal key As String, ByVal defaultValue As Long) As Long

    Function GetBoolean(key As String) As Boolean
    Function GetBoolean(key As String, defaultValue As Boolean) As Boolean

    Function GetSingle(ByVal key As String) As Single
    Function GetSingle(ByVal key As String, ByVal defaultValue As Single) As Single

    Function GetDouble(ByVal key As String) As Double
    Function GetDouble(ByVal key As String, ByVal defaultValue As Double) As Double

    Function GetDecimal(ByVal key As String) As Decimal
    Function GetDecimal(ByVal key As String, ByVal defaultValue As Decimal) As Decimal

    Function GetKeys() As String()
    Function GetValues() As String()

    Sub SetValue(ByVal key As String, ByVal value As Object)
    Sub Remove(ByVal key As String)

    Event KeySet As EventHandler(Of ConfigKeyEventArgs)
    Event KeyRemoved As EventHandler(Of ConfigKeyEventArgs)

End Interface

